<template>
<div class="container">
  <div class="activities_list" v-for="Theme in ThemeList" :key="Theme.id" :style="{backgroundImage: 'url(' + Theme.cover + ')'}">
  </div>
</div>
</template>

<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: "Theme",
});
</script>

<script setup lang="ts">
import {reqThemeList} from '@/api/discovery'
import {onMounted,ref} from "vue";


const ThemeList = ref([])
onMounted(async () => {
  const res = await reqThemeList(10)
  console.log(res.data.data.content)
  ThemeList.value = res.data.data.content
})

</script>

<style scoped>
.activities_list{
  width: 284px;
  height: 157px;
  margin: 0 16px 20px 0;
  cursor: pointer;
  background-size: cover;
}
.container{
  width: 1200px;
  display: flex;
  flex-wrap: wrap;
  padding-top: 20px;
  background-color: #fff;
}

</style>
